from socket import socket, AF_INET, SOCK_DGRAM
sock = socket(AF_INET, SOCK_DGRAM)
for x in range(40):
    sock.sendto(str(x).encode('ascii'), ('localhost', 20001))
    resp = sock.recvfrom(8192)
    print(f"{resp = }")
    print(f"{resp[0] = }")